package com.dhl.fin.api.domain;

import com.dhl.fin.api.common.domain.BasicDomain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

/**
 * @author CuiJianbo
 * @since 2025/3/15
 */

/**
 * 记录每天的利息
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "t_daily_rate")
public class DailyRate extends BasicDomain {

    @Column(columnDefinition = "decimal(10,2)")
    private Double currentBalance;

    @Column(columnDefinition = "decimal(10,3)")
    private Double yearRate;

    @Column(columnDefinition = "decimal(10,3)")
    private Double interest;

    @Column(columnDefinition = "date")
    private Date day;

    @ManyToOne
    @JoinColumn(name = "bank_account_id")
    private BankAccount bankAccount;


}
